Skip to content

NXP backend: Test avg_pool2d with new Neutron flow.#19147

Draft
MartinPavella wants to merge 4 commits intopytorch:mainfrom
nxp-upstream:nxg01483/EIEX-858-add-avg_pool2d-support-using-new-neutron-flow
Draft

NXP backend: Test avg_pool2d with new Neutron flow.#19147
MartinPavella wants to merge 4 commits intopytorch:mainfrom
nxp-upstream:nxg01483/EIEX-858-add-avg_pool2d-support-using-new-neutron-flow

Conversation

@MartinPavella
Copy link
Copy Markdown
Collaborator

@MartinPavella MartinPavella commented Apr 27, 2026

Summary

Add tests verifying correct support for avg_pool2d by the Neutron backend using the new Neutron MLIR flow.

Test plan

Unit tests provided.

cc @robert-kalmar @JakeStevens @digantdesai

@MartinPavella MartinPavella self-assigned this Apr 27, 2026
@MartinPavella MartinPavella added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Apr 27, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 27, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19147

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 16 New Failures, 1 Unrelated Failure

As of commit 0394b4d with merge base b4d4507 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 27, 2026
@MartinPavella
Copy link
Copy Markdown
Collaborator Author

Based on another PR: #19112

@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@jirioc
Copy link
Copy Markdown
Collaborator

jirioc commented Apr 27, 2026

Note that neutron unit tests are failing.

@MartinPavella MartinPavella force-pushed the nxg01483/EIEX-858-add-avg_pool2d-support-using-new-neutron-flow branch from 737f772 to 0394b4d Compare April 27, 2026 07:56
from executorch.backends.nxp.tests.use_qat import * # noqa F403
from executorch.exir.dialects._ops import ops as exir_ops

AvgPool2D = exir_ops.edge.aten.avg_pool2d.default
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about creating a file with aliases for all tests? This way we would need to define it everywhere.


if any(s > 4096 for s in stride):
return False

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also check the input types as they are specified in docs.

# not create any NeutronGraph that can be called. This is done by the partitioner itself, and is not handled by
# the individual node converters.
allow_no_op_partitions: bool = False

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comment would be good here.

)

lower_run_compare(
model, input_shape, graph_verifier, use_new_flow_neutron_c=True
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting use_new_flow_neutron_c=True just here is not enough, it won't be passed to custom_delegation_options in partitioner.

Copy link
Copy Markdown
Collaborator

@StrycekSimon StrycekSimon Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly what I wanted to comment few hours ago but had to go... 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants